d02gbf
d02gbf
© Numerical Algorithms Group, 2002.
Purpose
D02GBF ODEs, boundary value problem, finite difference technique with
deferred correction, general linear problem
Synopsis
[c,d,gam,y,np,x,ifail] = d02gbf(a,b,tol,fcnf,fcng,c,d,gam<,np,mnp,x,ifail>)
Description
D02GBF solves the linear two-point boundary value problem for a
system of n ordinary differential equations in the interval
[a,b]. The system is written in the form
y'=F(x)y+g(x) (1)
and the boundary conditions are written in the form
Cy(a)+Dy(b)=(gamma) (2)
Here F(x), C and D are n by n matrices, and g(x) and (gamma) are
n-component vectors. The approximate solution to (1) and (2) is
found using a finite-difference method with deferred correction.
The algorithm is a specialisation of that used in subroutine
D02RAF which solves a nonlinear version of (1) and (2).
The user supplies an absolute error tolerance and may also supply
an initial mesh for the construction of the finite-difference
equations (alternatively a default mesh is used). The algorithm
constructs a solution on a mesh defined by adding points to the
initial mesh. This solution is chosen so that the error is
everywhere less than the user's tolerance and so that the error
is approximately equidistributed on the final mesh. The solution
is returned on this final mesh.
If the solution is required at a few specific points then these
should be included in the initial mesh. If, on the other hand,
the solution is required at several specific points, then the
user should use the interpolation routines provided in Chapter
E01 if these points do not themselves form a convenient mesh.
Parameters
d02gbf
Required Input Arguments:
a real
b real
tol real
fcnf function (User-Supplied)
fcng function (User-Supplied)
c (:,:) real
d (:,:) real
gam (:) real
Optional Input Arguments: <Default>
np integer 0
mnp integer 2*max(np,32)
x (mnp) real zeros(mnp,1)
ifail integer -1
Output Arguments:
c (:,:) real
d (:,:) real
gam (:) real
y (:,mnp) real
np integer
x (mnp) real
ifail integer